package team.ttorder.ttorder.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import team.ttorder.ttorder.model.OrderDetail;
import team.ttorder.ttorder.mymapper.MyMapper;

public interface OrderDetailMapper extends MyMapper<OrderDetail> {
	
	@Delete("delete from order_detail where order_id = #{id}")
	public void deleteOrderDetailByOrderId(Integer id); 
	
	@Select("select id as id,order_id as orderId,food_id as foodId,food_count as foodCount from order_detail  where order_id = #{id}")
	public List<OrderDetail> getOrderDetailByOrderId(Integer id);
}
